package com.salt.core.verify.image.utils;

import java.util.Random;

/**
 * @Description
 * @Author salt
 * @Date 2022/9/22
 * @Version 1.0.1
 */
public class IndexUtil {

    public static int createIndex(Integer totalNum, Integer startIndex) {
        Random random = new Random();
        return random.nextInt(totalNum)%(totalNum-startIndex + 1) + startIndex;
    }

    /*public static void main(String[] args) {
        int ss = createIndex(3, 1);
        System.out.println(ss);
    }*/

}
